home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (April 1991)
/
HAMCALL CD-ROM (Buckmaster)(April 1991).BIN
/
prgming
/
ctutor
/
charout.c
< prev
next >
Wrap
Text File
|
1990-10-14
|
772b
|
36 lines
/* Chapter 10 - Program 2 */
#include "stdio.h"
main()
{
FILE *point;
char others[35];
int indexer,count;
strcpy(others,"Additional lines.");
point = fopen("tenlines.txt","a"); /* open for appending */
for (count = 1;count <= 10;count++) {
for (indexer = 0;others[indexer];indexer++)
putc(others[indexer],point); /* output a single character */
putc('\n',point); /* output a linefeed */
}
fclose(point);
}
/* Result of output (appended to TENLINES.TXT)
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
Additional lines.
*/